package com.bzframework.pro.entity;

import com.bzframework.pro.model.charge.Charge;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.hswebframework.ezorm.rdb.mapping.annotation.ColumnType;
import org.hswebframework.ezorm.rdb.mapping.annotation.DefaultValue;
import org.hswebframework.ezorm.rdb.mapping.annotation.JsonCodec;
import org.hswebframework.web.api.crud.entity.GenericEntity;
import org.hswebframework.web.crud.annotation.EnableEntityEvent;

import javax.persistence.Column;
import javax.persistence.Table;
import java.sql.JDBCType;
import java.util.List;

/**
 * @Author bingzhong
 * @Date 2025/4/23 15:29
 * @Description 收据
 */

@Table(name = "beiya_charge")
@Getter
@Setter
@Schema(description = "收据表")
@EnableEntityEvent //开启实体类crud事件
public class ChargeEntity extends GenericEntity<String> {

    @Column
    private String charge_id;

    @Column
    private String createtime;

    @Column
    private String updatetime;

    // 打单日期
    @Column
    private String print_time;

    @Column
    private String student_id;

    @Column
    private String campus_id;

    @Column
    private String receipt_awaw_type;

    @Column
    private String order_code;

    /**
     * 交费日期
     */
    @Column
    private String date;

    @Column
    private Double ought_pay;

    @Column
    private Double direct_reduce;

    @Column
    private Double ought_payfact;

    @Column
    private Double reduction_reserve_money;

    @Column
    private Double payfact;

    @Column
    private String receiptno;

    @Column
    @JsonCodec
    @DefaultValue("[]")
    @ColumnType(javaType = String.class, jdbcType = JDBCType.LONGVARCHAR)
    private List<Charge> charges;

    @Column
    private String phone;


}
